<template>
  <div class="detail-container">
    <!--title-->
    <div class="detail-title">
      <mt-header>
        <router-link to="/Recommend" slot="left">
          <mt-button class="iconfont arrow-icon"></mt-button>
        </router-link>
        <mt-button class="iconfont search-icon" slot="right"></mt-button>
        <mt-button class="iconfont share-icon" slot="right"></mt-button>
      </mt-header>
      <div class="title-padding">
        <h2 class="detail-title-name">{{title}}</h2>
        <a href="" class="all-reply">查看全部111个回答 ></a>
      </div>
      <!--title btn-->
      <div class="title-btn-box">
        <mt-button type="default"><i class="iconfont invite-icon"></i> 邀请回答</mt-button>
        <mt-button type="default"><i class="iconfont answer-icon"></i> 写回答</mt-button>
      </div>
    </div>
    <!--content-->
    <div class="detail-content">
      <div class="user-img">
        <img src="" alt="">匿名用户
      </div>
      <!--内容-->
      <div class="main-body-txt">{{content}}</div>
      <p>发布于2018-12-31.著作权作者所有</p>
    </div>
    <!--footer-->
    <div class="detail-footer">
      <!--左边-->
      <div class="detail-footer-left">
        <span><i class="iconfont approval-icon"></i> 赞同426</span>
        <span><i class="iconfont oppose-icon"></i></span>
      </div>
      <!--右边-->
      <div class="detail-footer-right">
         <span><i class="iconfont thank-icon"></i><br>感谢</span>
        <span><i class="iconfont collect-icon"></i><br>收藏</span>
        <span><i class="iconfont comment-icon"></i><br>评论</span>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'sample',
    data() {
      return {
        title:this.$route.query.title,
        content:this.$route.query.content
      }
    },
    methods: {
      GetSlideDirection(startX, startY, endX, endY) {
        var dy = startY - endY;
        //var dx = endX - startX;
        var result = 0;
        if(dy>0) {//向上滑动
          result=1;
        }else{//向下滑动
          result=2;
        }
        return result;
      },

    },
    computed: {},
    created() {
      const vm = this
    },
  }
</script>

<style>
</style>
